package com.huage_07.lesson_04;

import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class TxtToArrayList {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("class1\\src\\com\\huage_07\\lesson_04\\array.txt"));
        ArrayList<String> array = new ArrayList<String>();

        String line;
        while ((line=br.readLine())!=null){
            array.add(line);
        }

        br.close();

        for (String s : array){
            System.out.println(s);
        }
    }
}
